<template>
  <!--@tap.stop="close"-->
	<view v-if="modelValue" class="uiwu-popup-model">
		<slot></slot>
	</view>
</template>

<script setup lang="ts">
	/**
	 * uiwu-popup 弹窗遮罩层
	 * @property {boolean} modelValue 控制是否显示弹窗内容 通过v-model绑定即可
	 * @event {Function()} close 关闭事件 如果需要可以接收
	 */
	defineProps({
		modelValue:{
			default:false,
			type:Boolean,
			required:true
		}
	})
	const emits = defineEmits(['update:modelValue','close'])
	const close = () : void => {
		emits('update:modelValue', false);
		emits('close')
	};
</script>
<style lang="scss" scoped>
	.uiwu-popup-model{
		position: fixed;
		left: 0;
		right: 0;
		top: 0;
		bottom: 0;
		background: rgba(#000,0.5);
		z-index: 99;
		/* #ifdef H5 */
		z-index: 90;
		/* #endif */
	}
</style>
